﻿package mortal.game.view.autoArena.view
{
    import com.mui.controls.*;
    import extend.language.*;
    import fl.data.*;
    import flash.display.*;
    import mortal.common.global.*;
    import mortal.component.window.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.view.autoArena.renderer.*;
    import mortal.game.view.common.*;
    import mortal.mvc.interfaces.*;

    public class AutoArenaRankRuleWin extends BaseWindow
    {
        private var _ruleList:GTileList;
        private static var _instance:AutoArenaRankRuleWin;

        public function AutoArenaRankRuleWin(param1:ILayer = null)
        {
            super(param1);
            setSize(489 - 30, 577);
            title = Language.getString(40877);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.pushUIToDisposeVec(UIFactory.bg(10, 37, 471 - 29, 505, this));
            this._ruleList = UIFactory.tileList(15 - 4, 43 - 4, 471, 514, this);
            this._ruleList.columnWidth = 461;
            this._ruleList.rowHeight = 62;
            this._ruleList.horizontalGap = 0;
            this._ruleList.verticalGap = 0;
            this._ruleList.setStyle("skin", new Bitmap());
            this._ruleList.setStyle("cellRenderer", AutoArenaRankRuleRenderer);
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(40878), 151, 551, 203, 20, this, GlobalStyle.textFormatLv));
            this.initRuleList();
            return;
        }// end function

        private function initRuleList() : void
        {
            var _loc_1:* = AutoArenaRewardConfig.instance.getInfosByType(1);
            var _loc_2:* = new DataProvider();
            _loc_2.addItems(_loc_1);
            this._ruleList.dataProvider = _loc_2;
            this._ruleList.drawNow();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._ruleList.dispose();
            this._ruleList = null;
            return;
        }// end function

        public static function get instance() : AutoArenaRankRuleWin
        {
            if (_instance == null)
            {
                _instance = new AutoArenaRankRuleWin;
            }
            return _instance;
        }// end function

    }
}
